{template('header.html')}

<script type="text/javascript">
<!--
function IsValidName(s) {
	var pattern=/^[a-zA-Z]{1}([a-zA-Z0-9]|[_]){3,19}$/;
	if (!pattern.test(s)) return false;
	return true;
}

function CheckForm(){
        if (document.addform.SortName.value==""){
            alert("分类名称不能为空！");
            document.addform.SortName.focus();
            return false;
        }
}

function HideError() {
		return true;
}
//-->
</script>
<TABLE border="0" cellpadding="0" cellspacing="0" class="tb_style" width="100%">
  <TBODY>
  <TR>
    <TD class=td_title align=left colSpan=8>&nbsp;标签分类管理</TD></TR>
</TBODY></TABLE>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="tb_style">
  <FORM name="form" action="templets_label.asp" method="post">
  <TBODY>
  <TR>
    <TD class="td_border" align="middle" width="10%" bgColor="#fafbf7" height="30">编号ID</TD>
    <TD class="td_border" align="left" width="#" bgColor=#fafbf7>&nbsp;分类名称</TD>
    <TD class="td_border" align="middle" width="15%" bgColor=#fafbf7>操作</TD>
	</TR>

{$rs type='rs' pagesize='0' }
  <TR class=tr_border onmouseover="this.style.backgroundColor='#FCFDEE'"
  onmouseout="this.style.backgroundColor=''">
    <TD class="td_border" align=middle>{$rs('id')}</TD>
    <TD class="td_border" align=left>&nbsp;{$rs('name')}</TD>
    <TD class="td_border" align=middle height=30>
     <A href="{:U(MODULE_NAME &'/edittagsort?id='& rs('id'))}">编辑</A>
     <A onclick="return confirm('确定将此分类删除吗?\n该分类一旦删除: 该分类下的所有标签将转移到“未分类” ');"
      href="{:U(MODULE_NAME &'/deltagsort?id='& rs('id'))}">删除</A></TD>
	  </TR>
{/$rs}
{@empty for='rs'} <tr style="height:30px;"> <td align="left" colspan="3">&nbsp;&nbsp; <font color=red>暂无数据！</font></td> </tr>{/@empty}

  <TR>
    <TD style="BACKGROUND: #fafbf7; BORDER-BOTTOM: #e2f5bc 4px solid" colSpan=8
    height=35>
      <DIV class=pages>
		{@pager data='rs'}
			{$pager("total")} 条记录 {$pager("no")}/{$pager("count")} 页 {if pager("count")>1}{$pager("bar")}{/if}
		{/@pager}
	  </DIV></TD></TR>
	 </FORM>
	</TBODY>
</TABLE><BR>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb_style">
	<form action="{:U(MODULE_NAME &'/addtagsort')}" method="post" name="addform" >
		<tr>
			<td colspan="3" class="td_title" align="center">&nbsp;添加标签分类</td>
		</tr>
		<tr>
			<td width="40%" height="30" class="td_border" align="right">&nbsp;分类名称：&nbsp;</td>
			<td width="60%" class="td_border">
			<input type="text" name="name" id="name" value="" size="40"
			onfocus="this.style.borderColor='#F93'" onblur="this.style.borderColor='#CCC'" /></td>
		</tr>
		<tr>
			<td height="40" colspan="2" align="center" class="td_border">&nbsp;
			<input type="submit" name="Submit" value="确定添加" class="rb1" onClick="return CheckForm();"/></td>
		</tr>
	</form>
</table><BR>

{template('footer.html')}